#include <bits/stdc++.h>
using namespace std;
int n,ans,a[100009],f[100009];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    ans=n;
    for(int i=1;i<=n;i++)
        scanf("%d",&a[i]);
    sort(a+1,a+1+n);
    int mina=a[1],minm=1,sum=1;
    for(int i=2;i<=n;i++)
    {
        if(a[i]==mina)
        {
            minm++;
            sum++;
            f[i]=1;
            continue;
        }
        if(minm!=0) minm--,ans--;
        else if(a[i]>a[sum+1]) ans--,sum++;
    }
    printf("%d",ans);
    return 0;
}

